<template>
    <h1>Risk</h1>
</template>

<script>
import axios from 'axios';

export default {
    data() {
        return {
            searchParams: '',
            riskPreventionListDTO: {
                ddlRpiBranch: '',
                ddlRpiDept: '',
                processNo: '',
                ddlRpiOpenYear: '',
                ddlRpiOpenMonth: '',
                txtRpiOrder: ''
            },
        }
    },
    created() {
        // 获取序列化的参数并解析
        const riskPreventionListDTOStr = this.$route.query.riskPreventionListDTO;
        if (riskPreventionListDTOStr) {
            this.searchParams = JSON.parse(riskPreventionListDTOStr);
            this.btnRpiSearchClick();
        }
    },
    methods: {
        btnRpiSearchClick() {
            axios.get("/api/risk/btnRpiSearchClick", {
                params: this.searchParams,
                headers: {
                    'Content-Type': 'application/x-www-form-urlencoded'
                }
            }).then((res) => {
                if (res.data.code === 1) {
                    console.log(success)
                } else if (res.data.code === 0) {
                    console.log(error)
                }
            })
        },
    }
}
</script>

<style scoped></style>